<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport"
			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
		<link rel="stylesheet" type="text/css" href="../css/mui.css"/>
		<link rel="stylesheet" type="text/css" href="../css/mine.css"/>
		<script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="mui-scroll-wrapper" >
			<div class="mui-scroll">
				<!--这里放置真实显示的DOM内容-->
				<div class="header">
					<div class="sign">
						<div class="btn">
							<img src="../img/ic_sign_clock.png" >
							签到
						</div>
					</div>
					<div class="login">
						<h2>登录领好礼</h2>
					</div>
					<div class="incons">
						<div class="incon-login">
							<img src="../img/ic_login_phone.png" >
							<div class="text">
								一键登录
							</div>
						</div>
						<div class="incon-wx">
							<img src="../img/ic_share_wechat.png" >
						</div>
						<div class="incon-wb">
							<img src="../img/ic_share_weibo.png" >
						</div>
						
					</div>
					<div id="islogin">
						<div class="login-logo">
							<img src="../img/img_head_default.png" id="mylogo" onerror="this.src='../img/img_head_default.png'">
						</div>
						<div class="login-info">
							<h3>氪友123</h3>
							<div class="login-time">
								你与36氪的1天
							</div>
						</div>
						
					</div>
					
					<div class="handup">
						<div class="item">
							<div class="item-up">
								0
							</div>
							<div class="item-down">
								关注
							</div>
						</div>
						<div class="item">
							<div class="item-up">
								0
							</div>
							<div class="item-down">
				               收藏
							</div>
						</div>
						<div class="item">
							<div class="item-up watched">
								0
							</div>
							<div class="item-down">
								浏览
							</div>
						</div>
						
					</div>
					
				</div>
				
				<ul class="mui-table-view my-ul">
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right">
								<img src="../img/ic_notification_message.png"  >消息中心
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right">
								<img src="../img/ic_mine_shopping_20.png" >
								积分商城
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right">
								<img src="../img/ic_mine_integral_20.png" >
								 积分任务
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right">
								<img src="../img/ic_prs_my_kaike.png" >
								 我的开氪
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right">
								 <img src="../img/prs_report.png" >寻求报道
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right">
								<img src="../img/prs_feedback.png" >意见反馈
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right">
								<img src="../img/ic_mine_more_20.png" >更多服务
							</a>
						</li>
					</ul>
				
				<div class="mui-table-view-cell setting">
					<a class="mui-navigate-right">
						设置
					</a>
				</div>
			</div>
		</div>
		
		
	</body>
	<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/myurl.js" type="text/javascript" charset="utf-8"></script>
	
	<script type="text/javascript">

	(function($){
	 $(".mui-scroll-wrapper").scroll({
	  //bounce: false,//滚动条是否有弹力默认是true
	  indicators: false //是否显示滚动条,默认是true
	 }); 
	})(mui);
	
	
		mui('.incon-login')[0].addEventListener('tap',function(){
			
			parent.location.href = 'login.html'
		})
		mui('.setting')[0].addEventListener('tap',function(){
			
			parent.location.href = 'setting.html'
		})
		
		
		if(localStorage.getItem('userid')){
			$('.login').hide()
			$('.incons').hide()
			$('#islogin').css('display','flex')
			$('.login-info>h3').text('氪友'+localStorage.getItem('userid'))
			$('#mylogo').attr('src',`../uploads/${localStorage.getItem('userid')}.png`)
			mui('.watched')[0].addEventListener('tap',function(){
				parent.location.href='watched.html'
			})
			
		}
		
		$.post(myurl+'/user/getMessage',(res)=>{
			if(localStorage.getItem('userid')){
				$('.watched').text(res.num)
			}
			
		})
		
		
		
	</script>
</html>
